<template>
  <div>
    <el-container style="height: 650px; border: 1px solid #eee">
      <el-aside width="220px" style="background-color: rgb(238, 241, 246)">
        <el-menu :default-openeds="['1', '3']">
          <el-menu-item index="1">
            <template slot="title">
              <i class="el-icon-message"></i>首页
            </template>
          </el-menu-item>
          <el-menu-item index="2">
            <template slot="title">
              <i class="el-icon-message"></i>餐台管理
            </template>
          </el-menu-item>
          <el-menu-item index="3">
            <template slot="title">
              <i class="el-icon-message"></i>设备管理
            </template>
          </el-menu-item>
          <el-menu-item index="4">
            <template slot="title">
              <i class="el-icon-message"></i>记录查询
            </template>
          </el-menu-item>
          <el-menu-item index="5">
            <template slot="title">
              <i class="el-icon-message"></i>员工管理
            </template>
          </el-menu-item>
          <el-submenu index="6">
            <template slot="title">
              <i class="el-icon-menu"></i>菜品管理
            </template>
          </el-submenu>
        </el-menu>
      </el-aside>

      <el-container>
        <el-main>
          <!--<el-table :data="tableData">
            <el-table-column prop="date" label="日期" width="140"></el-table-column>
            <el-table-column prop="name" label="姓名" width="120"></el-table-column>
            <el-table-column prop="address" label="地址"></el-table-column>
          </el-table>-->
        </el-main>
        <!-- 内容区 -->
        <el-main>
          <!-- 路由占位符，用于展示内容区的内容 -->
          <div style="padding:15px">
            <keep-alive :include="catch_components">
              <router-view />
            </keep-alive>
          </div>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
export default {
  data() {
    const item = {
      date: "2022-01-01",
      name: "melon",
      address: "123",
    };
    return {
      tableData: Array(20).fill(item),
    };
  },
};
</script>

<style>
.el-header {
  background-color: #b3c0d1;
  color: #333;
  /*line-height: 60px;*/
}

.el-aside {
  color: #333;
}
</style>
